import request from '@/utils/request'

// 查询开票记录列表
export function listInvoice(query) {
  return request({
    url: '/invoice/invoice/list',
    method: 'get',
    params: query
  })
}

// 查询开票记录列表
export function listInvoiceTaskList(query) {
  return request({
    url: '/invoice/invoice/task-list',
    method: 'get',
    params: query
  })
}


// 查询开票记录详细
export function getInvoice(id) {
  return request({
    url: '/invoice/invoice/' + id,
    method: 'get'
  })
}

// 新增开票记录
export function addInvoice(data) {
  return request({
    url: '/invoice/invoice',
    method: 'post',
    data: data
  })
}

// 修改开票记录
export function updateInvoice(data) {
  return request({
    url: '/invoice/invoice',
    method: 'put',
    data: data
  })
}

// 删除开票记录
export function delInvoice(id) {
  return request({
    url: '/invoice/invoice/' + id,
    method: 'delete'
  })
}

export function applyForPayslipInvoice(data) {
  return request({
    url: '/invoice/invoice/applyForPayslipInvoice',
    method: 'post',
    data: data
  })
}

export function submitPayslipInvoice(data) {
  return request({
    url: '/invoice/invoice/submitPayslipInvoice',
    method: 'post',
    data: data
  })
}
export function submitPayslipInvoiceAll(data) {
  return request({
    url: '/invoice/invoice/submitPayslipInvoiceAll',
    method: 'post',
    data: data
  })
}

// 修改开票记录
export function toExamine(data) {
  return request({
    url: '/invoice/invoice/toExamine',
    method: 'put',
    data: data
  })
}




